<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>5.3函数</title>
</head>

<body>
    <script>
        function fn(x) {
            if (x % 3 == 0 && x % 5 == 0 && x % 7 == 0){
                return true
            }
        }
        var nb = 0
        for(var i=1; i<=1000;i++){
            if(fn(i)){
                nb +=1;
                document.write(i + ' ')
                if(nb%6 == 0){
                    document.write('<br>')
                }
            }
        }
    </script>
</body>

</html>